# -*- coding: utf-8 -*-
"""
@Time ： 2021/8/6 20:11
@Auth ： Mr.掌心 2929184523
@Company ：特斯汀学院 @testingedu.com.cn
@Function ：请输入模块功能描述
"""
import threading

from appium import webdriver

caps1 = {
    "platformName": "Android",
    "deviceName": "127.0.0.1:62001",
    "platformVersion": "7.1.2",
    "appPackage": "com.tencent.mobileqq",
    "appActivity": ".activity.SplashActivity"
}

caps2 = {
    "platformName": "Android",
    "deviceName": "127.0.0.1:7555",
    "platformVersion": "6.0.1",
    "appPackage": "com.tencent.mobileqq",
    "appActivity": ".activity.SplashActivity"
}

def task1():
    webdriver.Remote("http://localhost:4723/wd/hub", caps1)

def task2():
    webdriver.Remote("http://localhost:4725/wd/hub", caps2)

threads = []
t1 = threading.Thread(target=task1)
threads.append(t1)
t2 = threading.Thread(target=task2)
threads.append(t2)


if __name__ == '__main__':
    for t in threads:
        t.start()